# $Id: PKGBUILD 88538 2013-04-19 13:02:32Z seblu $
# Maintainer: Sébastien Luttringer

pkgname=ldoc
pkgver=1.3.11
pkgrel=1
pkgdesc='A LuaDoc-compatible documentation generation system'
arch=('any')
url='http://stevedonovan.github.com/ldoc/'
license=('custom')
depends=('lua' 'lua-penlight')
source=("$pkgname-$pkgver.tar.gz::https://github.com/stevedonovan/ldoc/archive/$pkgver.tar.gz")
md5sums=('03f967ed92078fc689ffb0fc75bd78de')

package() {
  cd LDoc-$pkgver
  # install library
  install -dm755 "$pkgdir/usr/share/lua/5.2"
  cp -a ldoc "$pkgdir/usr/share/lua/5.2"
  # install binaries
  install -Dm755 ldoc.lua "$pkgdir/usr/bin/ldoc.lua"
  ln -s ldoc.lua "$pkgdir/usr/bin/ldoc"
  # copy docs
  install -Dm644 readme.md "$pkgdir/usr/share/docs/$pkgname/readme.md"
  install -Dm644 doc/doc.md "$pkgdir/usr/share/docs/$pkgname/doc.md"
  # copy license
  install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et:
